import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('@/views/home/home');
const Login = () => import('@/views/login/login');
const Default=() => import('@/views/home/default/default');
const UserManage=() => import('@/views/home/userManage/userManage');
const ArticleManage=() => import('@/views/home/articleManage/articleManage');
const LimitManage=() => import('@/views/home/limitManage/limitManage');
const Setting=() => import('@/views/home/setting/setting');

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children:[
      {
        path:'/',
        name:'Default',
        component:Default
      },
      {
        path:'/usermanage',
        name:'UserManage',
        component:UserManage
      },
      {
        path:'/articlemanage',
        name:'ArticleManage',
        component:ArticleManage
      },
      {
        path:'/limitmanage',
        name:'LimitManage',
        component:LimitManage
      },
      {
        path:'/setting',
        name:'Setting',
        component:Setting
      }
    ]
  },
  {
    path:'/login',
    name:'Login',
    component:Login
  }
]

const router = new VueRouter({
  routes
})

export default router
